package org.tity.sql.sql;

import static org.junit.Assert.assertTrue;

import java.util.List;

import org.junit.Test;
import org.tity.sql.sql.parser.SQLParserUtil;

import com.alibaba.druid.util.JdbcConstants;

public class SQLParserUtilTest {
	
	@Test
	public void aaa() {
		 
		 
		String sql="select * from org_system a left join org_user b on a.id=b.id  where code=   ?";
	     String dbType = JdbcConstants.ORACLE;
	     List<String> tables=SQLParserUtil.getAllTables(sql,dbType);
	     assertTrue(tables.contains("org_system"));
	     assertTrue(tables.contains("org_user"));
	}

}
